
package com.insigma.business.qrcode.soldier.request;


import com.insigma.business.qrcode.common.service.SequenceGenerator;
import com.insigma.business.qrcode.soldier.dao.SoldierBasicModifyRecordDao;
import com.insigma.business.qrcode.soldier.dto.SequenceNameConstant;
import com.insigma.business.qrcode.soldier.entity.SoldierBasicModifyRecordDO;
import com.insigma.business.qrcode.soldier.service.SoldierBasicModifyRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("soldierBasicModifyRecordService")
public class SoldierBasicModifyRecordServiceImpl implements SoldierBasicModifyRecordService {

    @Autowired(required = false)
    private SoldierBasicModifyRecordDao soldierBasicModifyRecordDao;
    @Autowired(required = false)
    private SequenceGenerator sequenceGenerator;

    
    @Override
    public List<SoldierBasicModifyRecordDO> search(final SoldierBasicModifyRecordBSearcher soldierBasicModifyRecordBSearcher) {
        return soldierBasicModifyRecordDao.search(soldierBasicModifyRecordBSearcher);
    }
   
    @Override
    public SoldierBasicModifyRecordDO get(final String id){
        return soldierBasicModifyRecordDao.get(id);
    }

    
    @Override
    public Integer insert(final SoldierBasicModifyRecordDO soldierBasicModifyRecordDO){
        soldierBasicModifyRecordDO.setId(sequenceGenerator.genKey(SequenceNameConstant.SOLDIER_BASIC_MODIFY_RECORD_ID));
        return soldierBasicModifyRecordDao.insert(soldierBasicModifyRecordDO);
    }

    
    @Override
    public Integer update(final SoldierBasicModifyRecordDO soldierBasicModifyRecordDO){
        return soldierBasicModifyRecordDao.update(soldierBasicModifyRecordDO);
    }

    
    @Override
    public Integer delete(final String id, final String modifierType, final String modifierId){
        return soldierBasicModifyRecordDao.delete(id,modifierType,modifierId);
    }

}
